<?php
	$resources = GxcHelpers::getResourceObjectFromDatabase($post,'thumbnail');
?>
<div class="span4">
 <div class="zoom-image margcenter">
 	<a name="product_main" href='<?php echo $resources[0]['link'];?>' class = 'cloud-zoom thumbnail1' id='zoom1' rel="adjustX: 10, adjustY:-4, softFocus:false, zoomWidth:420">
 		<img src="<?php echo $resources[0]['link'];?>" alt='' align="left" title="" />
   	</a>
 </div> 
 <div class="row" style="margin-bottom: 20px;">
 <?php if(count($resources) > 1):?> 
	<?php $i = 0; ?>
	<?php foreach($resources as $resource):?>
		<?php $i++; ?>
		<?php if($i >= 1):?>
		  	<div class="span1 margcenter" >
		 		<a name="product_other" href='<?php echo $resource['link']; ?>' class='cloud-zoom-gallery thumbnail1' title='Thumbnail 1' rel="useZoom: 'zoom1', smallImage: '<?php echo $resource['link']; ?>' ">
		       		<img src="<?php echo $resource['link']; ?>" alt = "Thumbnail 1"/>
		       	</a>
			</div>
		<?php endif; ?>
	<?php endforeach;?>
<?php endif;?>					
 </div>
</div>

<div class="middle-bar">
	<h2><?php echo $post->object_name; ?></h2>
  	<p><?php echo $post->object_content; ?></p>
	<div class="divide"></div>
</div>
<div class="left-bar" style="margin-left: 20px;">
	<div class="pricebox">
		<span class="pricelabel">Giá: </span>
		<span class="pricevalue"><?php echo $post->price; ?></span>
		<span class="stockstatus"><?php echo $post->stock_status == 1 ? t('Còn hàng!') : t('Hết hàng'); ?></span>
		
	</div>
	<form action="">
		<button class="buttonOrder">
			<span class="buttonText">Đặt hàng</span>
		</button>
	</form>
	<form action="">
		<button class="buttonOrder">
			<span class="buttonText">Đặt hàng</span>
		</button>
	</form>
</div>
